package com.handpay.zztong.hp.main.model.component;

import android.os.Parcel;

import com.handpay.zztong.hp.bean.ResponseBean;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by lyang on 2017/4/14.
 */

public class ComponentHttpBean extends ResponseBean{

    /**
     * items : 17
     * list : [{"iconName":"44A4269F38DE7B062B47E82D6CB0A4C9","itemCode":"9CE33FDE8DFD1FA1AEEB387C49F5BBCA","itemTitle":"76E2C34ECB7EA06C","itemType":2,"list":[{"iconName":"5ADF030E044CC16011A903D4C3387DBA","itemCode":"2FDC39F1A66A8406","itemTitle":"04605ED49EEAFC0D36EEB595E6944271","itemType":1,"orderNum":1},{"iconName":"57965F00F13ACAC21A36B5CC38B5FE98","itemCode":"87DFD938EC8A3D46","itemTitle":"65910E7ECCC0F3E7BC1A286B8340494E","itemType":1,"orderNum":3}],"orderNum":5,"parentId":24,"showArea":1}]
     */

    private int items;
    private List<ListBeanX> list;

    public int getItems() {
        return items;
    }

    public void setItems(int items) {
        this.items = items;
    }

    public List<ListBeanX> getList() {
        return list;
    }

    public void setList(List<ListBeanX> list) {
        this.list = list;
    }

    public static class ListBeanX  extends ResponseBean{
        /**
         * iconName : 44A4269F38DE7B062B47E82D6CB0A4C9
         * itemCode : 9CE33FDE8DFD1FA1AEEB387C49F5BBCA
         * itemTitle : 76E2C34ECB7EA06C
         * itemType : 2
         * list : [{"iconName":"5ADF030E044CC16011A903D4C3387DBA","itemCode":"2FDC39F1A66A8406","itemTitle":"04605ED49EEAFC0D36EEB595E6944271","itemType":1,"orderNum":1},{"iconName":"57965F00F13ACAC21A36B5CC38B5FE98","itemCode":"87DFD938EC8A3D46","itemTitle":"65910E7ECCC0F3E7BC1A286B8340494E","itemType":1,"orderNum":3}]
         * orderNum : 5
         * parentId : 24
         * showArea : 1
         */

        private String iconName;
        private String itemCode;
        private String itemTitle;
        private String itemUrl;
        private int itemType;
        private int orderNum;
        private int parentId;
        private int showArea;
        private List<ListBean> list;

        public String getItemUrl() {
            return itemUrl;
        }

        public void setItemUrl(String itemUrl) {
            this.itemUrl = itemUrl;
        }

        public static Creator<ListBeanX> getCREATOR() {
            return CREATOR;
        }

        public String getIconName() {
            return iconName;
        }

        public void setIconName(String iconName) {
            this.iconName = iconName;
        }

        public String getItemCode() {
            return itemCode;
        }

        public void setItemCode(String itemCode) {
            this.itemCode = itemCode;
        }

        public String getItemTitle() {
            return itemTitle;
        }

        public void setItemTitle(String itemTitle) {
            this.itemTitle = itemTitle;
        }

        public int getItemType() {
            return itemType;
        }

        public void setItemType(int itemType) {
            this.itemType = itemType;
        }

        public int getOrderNum() {
            return orderNum;
        }

        public void setOrderNum(int orderNum) {
            this.orderNum = orderNum;
        }

        public int getParentId() {
            return parentId;
        }

        public void setParentId(int parentId) {
            this.parentId = parentId;
        }

        public int getShowArea() {
            return showArea;
        }

        public void setShowArea(int showArea) {
            this.showArea = showArea;
        }

        public List<ListBean> getList() {
            return list;
        }

        public void setList(List<ListBean> list) {
            this.list = list;
        }

        public static class ListBean extends  ResponseBean{
            /**
             * iconName : 5ADF030E044CC16011A903D4C3387DBA
             * itemCode : 2FDC39F1A66A8406
             * itemTitle : 04605ED49EEAFC0D36EEB595E6944271
             * itemType : 1
             * orderNum : 1
             */

            private String iconName;
            private String itemCode;
            private String itemTitle;
            private String itemUrl;

            private int itemType;
            private int orderNum;

            public String getItemUrl() {
                return itemUrl;
            }

            public void setItemUrl(String itemUrl) {
                this.itemUrl = itemUrl;
            }

            public static Creator<ListBean> getCREATOR() {
                return CREATOR;
            }

            public String getIconName() {
                return iconName;
            }

            public void setIconName(String iconName) {
                this.iconName = iconName;
            }

            public String getItemCode() {
                return itemCode;
            }

            public void setItemCode(String itemCode) {
                this.itemCode = itemCode;
            }

            public String getItemTitle() {
                return itemTitle;
            }

            public void setItemTitle(String itemTitle) {
                this.itemTitle = itemTitle;
            }

            public int getItemType() {
                return itemType;
            }

            public void setItemType(int itemType) {
                this.itemType = itemType;
            }

            public int getOrderNum() {
                return orderNum;
            }

            public void setOrderNum(int orderNum) {
                this.orderNum = orderNum;
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                super.writeToParcel(dest, flags);
                dest.writeString(this.iconName);
                dest.writeString(this.itemCode);
                dest.writeString(this.itemTitle);
                dest.writeString(this.itemUrl);
                dest.writeInt(this.itemType);
                dest.writeInt(this.orderNum);
            }

            public ListBean() {
            }

            protected ListBean(Parcel in) {
                super(in);
                this.iconName = in.readString();
                this.itemCode = in.readString();
                this.itemTitle = in.readString();
             this.itemUrl = in.readString();

                this.itemType = in.readInt();
                this.orderNum = in.readInt();
            }

            public static final Creator<ListBean> CREATOR = new Creator<ListBean>() {
                @Override
                public ListBean createFromParcel(Parcel source) {
                    return new ListBean(source);
                }

                @Override
                public ListBean[] newArray(int size) {
                    return new ListBean[size];
                }
            };
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            super.writeToParcel(dest, flags);
            dest.writeString(this.iconName);
            dest.writeString(this.itemCode);
            dest.writeString(this.itemTitle);
            dest.writeString(this.itemUrl);
            dest.writeInt(this.itemType);
            dest.writeInt(this.orderNum);
            dest.writeInt(this.parentId);
            dest.writeInt(this.showArea);
            dest.writeList(this.list);
        }

        public ListBeanX() {
        }

        protected ListBeanX(Parcel in) {
            super(in);
            this.iconName = in.readString();
            this.itemCode = in.readString();
            this.itemTitle = in.readString();
            this.itemUrl = in.readString();

            this.itemType = in.readInt();
            this.orderNum = in.readInt();
            this.parentId = in.readInt();
            this.showArea = in.readInt();
            this.list = new ArrayList<ListBean>();
            in.readList(this.list, ListBean.class.getClassLoader());
        }

        public static final Creator<ListBeanX> CREATOR = new Creator<ListBeanX>() {
            @Override
            public ListBeanX createFromParcel(Parcel source) {
                return new ListBeanX(source);
            }

            @Override
            public ListBeanX[] newArray(int size) {
                return new ListBeanX[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        super.writeToParcel(dest, flags);
        dest.writeInt(this.items);
        dest.writeList(this.list);
    }

    public ComponentHttpBean() {
    }

    protected ComponentHttpBean(Parcel in) {
        super(in);
        this.items = in.readInt();
        this.list = new ArrayList<ListBeanX>();
        in.readList(this.list, ListBeanX.class.getClassLoader());
    }

    public static final Creator<ComponentHttpBean> CREATOR = new Creator<ComponentHttpBean>() {
        @Override
        public ComponentHttpBean createFromParcel(Parcel source) {
            return new ComponentHttpBean(source);
        }

        @Override
        public ComponentHttpBean[] newArray(int size) {
            return new ComponentHttpBean[size];
        }
    };
}
